#include <iostream>
#include "ArrayCalcs.h"

using namespace std;

int main()
{
	int a[] = {12,5,8,98,32,3,1};
	double b[] = {12.2, 54.7, 5.5, 8.7};
	long c[] = { 89799, 32158, 65981, 198321 };
	
	cout << "int:" << endl;
	cout << "Max: " << ArrayCalcs<int>::max(a, sizeof(a) / sizeof(*a) - 1) << endl;
	cout << "Min: " << ArrayCalcs<int>::min(a, sizeof(a) / sizeof(*a) - 1) << endl;
	cout << "Sum: " << ArrayCalcs<int>::sum(a, sizeof(a) / sizeof(*a) - 1) << endl;
	cout << "Prod: " << ArrayCalcs<int>::prod(a, sizeof(a) / sizeof(*a) - 1) << endl;
	cout << "Med: " << ArrayCalcs<int>::med(a, sizeof(a) / sizeof(*a) - 1) << endl;
	cout << endl << "double:" << endl;
	cout << "Max: " << ArrayCalcs<double>::max(b, sizeof(b) / sizeof(*b) - 1) << endl;
	cout << "Min: " << ArrayCalcs<double>::min(b, sizeof(b) / sizeof(*b) - 1) << endl;
	cout << "Sum: " << ArrayCalcs<double>::sum(b, sizeof(b) / sizeof(*b) - 1) << endl;
	cout << "Prod: " << ArrayCalcs<double>::prod(b, sizeof(b) / sizeof(*b) - 1) << endl;
	cout << "Med: " << ArrayCalcs<double>::med(b, sizeof(b) / sizeof(*b) - 1) << endl;
	cout << endl << "long:" << endl;
	cout << "Max: " << ArrayCalcs<long>::max(c, sizeof(c) / sizeof(*c) - 1) << endl;
	cout << "Min: " << ArrayCalcs<long>::min(c, sizeof(c) / sizeof(*c) - 1) << endl;
	cout << "Sum: " << ArrayCalcs<long>::sum(c, sizeof(c) / sizeof(*c) - 1) << endl;
	cout << "Prod: " << ArrayCalcs<long>::prod(c, sizeof(c) / sizeof(*c) - 1) << endl;
	cout << "Med: " << ArrayCalcs<long>::med(c, sizeof(c) / sizeof(*c) - 1) << endl;

	system("pause");
	return 0;
}